package GUILayer;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.* ;
import java.util.*;
import ControlLayer.*;

public class GUI 
{
    
    private JFrame frame;
    private UIPerson uiPerson;
    private UIDVD uiDVD;
    private UICopy uiCopy;
    private UILoan uiLoan;


 
    
  
                  
    public static void main(String [] args)
    {
        new GUI();
    }
                       

   
    public GUI()
    {
       uiDVD=new UIDVD(); 
       uiPerson=new UIPerson();
       uiCopy=new UICopy();
       uiLoan=new UILoan();
       makeFrame();
       
    }

    
    private void makeFrame()
    {
  

   
     frame = new JFrame("DVD Loans");
     JPanel contentPane = (JPanel)frame.getContentPane();
     
   
     
     JTabbedPane tabbedPane = new JTabbedPane();
     contentPane.add(tabbedPane);
     JPanel panelPersons=uiPerson.getPersonsPanel(frame);
     JPanel panelDVDS=uiDVD.getDVDsPanel(frame);
     JPanel panelCopies=uiCopy.getCopiesPanel(frame);
     JPanel panelLoans=uiLoan.getLoansPanel(frame);
     JTextArea text2=new JTextArea() ;
     
     tabbedPane.addTab("Person",panelPersons);
      tabbedPane.add("DVDs",panelDVDS);
      tabbedPane.add("Copies",panelCopies);
      tabbedPane.add("Loan",panelLoans);
    
     
      frame.pack();
      frame.setVisible(true);
      


    }
    
   
    
  
    
   

    

}
